package com.kaoshi.management.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kaoshi.common.config.Result;
import com.kaoshi.management.pojo.XtPermissions;
import com.kaoshi.management.pojo.XtRoles;
import com.kaoshi.management.service.XtPermissionsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2024-11-07
 */
@RestController
@CrossOrigin
@RequestMapping("/xt-permissions")
public class XtPermissionsController {

    @Autowired
    private XtPermissionsService xtPermissionsService;

    @PostMapping("/bll/{current}/{pageSize}")
    public Result findAll(@PathVariable Integer current,
                          @PathVariable Integer pageSize,
                          @RequestBody XtPermissions xtPermissions) {

        Page<XtPermissions> page = xtPermissionsService.getPageList(current, pageSize,xtPermissions);
        return Result.ok(page);
    }

}
